home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / COMPHORI.CMD < prev    next >
Encoding:
Text File  |  1996-02-15  |  1.8 KB  |  97 lines

  1. #    LOGIN.CMD FOR COMPUTERIZED HORIZONS
  2. #
  3. #trace on
  4. #
  5. # *ONLY* change the information between the quotes after the word
  6. # 'username ' and 'password'.  Don't add anything else, or delete
  7. # anything else unless you know what you are doing.
  8. #
  9. if ![load $username]
  10.   if [username "Put: slip:YourUserID here"]
  11.     save $username
  12.   end
  13. end
  14. if ![load $password]
  15.   if [password "Enter your Password here"]
  16.     save $password
  17.   end
  18. end
  19. #
  20. #  DO NOT CHANGE ANYTHING AFTER THIS LINE UNLESS YOU KNOW WHAT
  21. #  YOU ARE DOING!
  22. #
  23. $number = "335-4073"
  24. $modemsetup = "&c1&k3"
  25. $prompt = ">"
  26. $userprompt = "User-ID"
  27. $passprompt = "assword:"
  28. $slipcmd = "slip"
  29. $addrtarg = "Your address is:"
  30. $pppcmd = "ppp"
  31.  
  32. %attempts = 10
  33. #
  34. #
  35. #----------------------------------------------------------
  36. #
  37. # initialize modem
  38. #
  39. output "atz"\13
  40. if ! [input 10 OK\n]
  41.   display "Modem is not responding"\n
  42.   abort
  43. end
  44. #
  45. # setup our modem commands
  46. #
  47. output "at"$modemsetup\13
  48. input 10 OK\n
  49. #
  50. # send phone number
  51. #
  52. %n = 0
  53. repeat
  54.   if %n = %attempts
  55.     display "Too many dial attempts"\n
  56.     abort
  57.   end
  58.   output "atdt"$number\13
  59.   %ok = [input 60 CONNECT]
  60.   %n = %n + 1
  61. until %ok
  62. input 10 \n
  63. #
  64. #  wait till it's safe to send because some modem's hang up
  65. #  if you transmit during the connection phase
  66. #
  67. wait 30 dcd
  68. #
  69. #
  70. #  wait for the username prompt
  71. display "Waiting for User-ID prompt..."\n
  72. #
  73. input 30 $userprompt
  74. output $username\13
  75. #
  76. # and the password
  77. #
  78. display "Waiting for Password prompt..."\n
  79. input 30 $passprompt
  80. output $password\13
  81. #
  82. # we are now logged in
  83. #
  84. input 20 ***
  85. input 5 $addrtarg
  86. #
  87. # parse address
  88. #
  89. address 5
  90. #
  91. # we are now connected, logged in and in slip mode.
  92. #
  93. display \n
  94. display Connected.  Your IP address is \i.\n
  95. #
  96. # now we are finished.
  97. #